//
//  WBDemoViewController.swift
//  Weibo
//
//  Created by yinbo on 2018/2/28.
//  Copyright © 2018年 yinbo. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let count:Int = (navigationController?.childViewControllers.count)!
        title = "第\(count)个"
        // Do any additional setup after loading the view.
    }
    @objc func nextBtn(){
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}

extension WBDemoViewController{
    override func setupUI() {
        super.setupUI()
       // navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style:.plain , target: self, action: #selector(nextBtn))
          navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(nextBtn))
    }
}
